<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>密码修改 - 爽客网</title>
<script type="text/javascript">
	$("#passWordForm").validate(
				{
					rules : {
						oldPassWord : {
							required : true,
							remote : 'checkPassword.htm',
							maxlength : 20
						},
						newPassWord : {
							required : true,
							minlength : 6,
							maxlength : 20
						},
						checkPassWord:{
							required : true,
							equalTo:'#newPassWord'
						}
					},
					messages : {
						
						oldPassWord : {
							required : "请填写当前密码",
							remote : "密码不正确",
							maxlength : "请输入正确的密码"
						},
						newPassWord : {
							required : "请填写密码",
							minlength : "密码长度为6～20位",
							maxlength : "密码长度为6～20位"
						},
						checkPassWord:{
							required : "请填写确认密码",
							equalTo: "两次密码输入不符"
						}
					},
					submitHandler : function() {
						$.post("ModifyPw.htm", {
							newPassWord : $("#newPassWord").val()
							}, function(data) {
								if (data == 'success') {
									alert("修改成功");
								} else{
									alert("修改失败");
								}
							});
					}
				});
	</script>
</head>
<body>
                        <!-- update password -->
                        <form id="passWordForm"  method="post">
                        	<table class="i_up_pwd">
                            	<tr>
                                	<td class="col1"><span>输入原密码：</span></td>
                                    <td>
                                    	<input type="password" id="oldPassWord" name="oldPassWord"/>
                                       <!--  <span class="i_tip1">请输入6-16位密码</span> -->
                                    </td>
                                </tr>
                                <tr>
                                	<td class="col1"><span>输入新密码：</span></td>
                                    <td>
                                    	<input type="password" id="newPassWord" name="newPassWord"/>
                                       <!--  <span class="i_tip2">请输入6-16位密码</span> -->
                                    </td>
                                </tr>
                                <tr>
                                	<td class="col1"><span>确认新密码：</span></td>
                                    <td>
                                    	<input type="password" id="checkPassWord" name="checkPassWord"/>
                                        <!-- <span class="i_tip3">请输入6-16位密码</span> -->
                                    </td>
                                </tr>
                                <tr>
                                	<td class="col1"></td>
                                    <td>
                                    	<input type="image" class="i_submit" id="mpw_btn" value="修改"/>
                                    </td>
                                </tr>
                            </table>
                        </form>
                        <!-- update password--end -->
</body>
</html>